package com.fqgj.sentry.policy.exception;

import com.fqgj.common.api.enums.ErrorCodeEnum;
import org.springframework.http.HttpStatus;


public enum PolicyErrorCodeEnums implements ErrorCodeEnum {
    policy_not_exist_error(2001, "该策略不存在", HttpStatus.OK),
    policy_exist_rule_error(2001, "该策略存在规则，不可删除", HttpStatus.OK),
    policy_grade_not_exist_column_error(2001, "评分卡策略字段名不能为空", HttpStatus.OK),
    policy_weight_not_exist_error(2001, "权重匹配需要添加权重范围", HttpStatus.OK),
    add_policy_error(2001, "新增策略异常", HttpStatus.OK),
    policy_not_exist_result_error(2001, "该策略集不存在执行结果", HttpStatus.OK),
    policy_score_match_change_error(2001, "策略类型为评分卡时，匹配模式不可切换", HttpStatus.OK);


    private Integer code;
    private String msg;
    private HttpStatus httpStatus;


    PolicyErrorCodeEnums(Integer code, String msg, HttpStatus httpStatus) {
        this.code = code;
        this.msg = msg;
        this.httpStatus = httpStatus;
    }

    public PolicyErrorCodeEnums setCode(Integer code) {
        this.code = code;
        return this;
    }

    public PolicyErrorCodeEnums setMsg(String msg) {
        this.msg = msg;
        return this;
    }

    public PolicyErrorCodeEnums setHttpStatus(HttpStatus httpStatus) {
        this.httpStatus = httpStatus;
        return this;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public HttpStatus getHttpStatus() {
        return httpStatus;
    }
}
